package org.openscheduler.modules.trigger;

import java.util.Date;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.quartz.JobDataMap;
import org.quartz.JobKey;
import org.quartz.TriggerKey;

public abstract class TriggerTemplate {

	private String cronExpression;
	private Date triggerEndTime;
	private JobKey keyOfJobToFire;
	private String calName;
	private Date triggerStartTime;
	private JobDataMap newJobDataMap;
	private String triggerDescription;
	private TriggerKey triggerKey;
	private Integer triggerPriority;
//	private Boolean startNow;
	private Integer misfireInstruction;

	public Integer getMisfireInstruction() {
		return misfireInstruction;
	}

	public void setMisfireInstruction(Integer misfireInstruction) {
		this.misfireInstruction = misfireInstruction;
	}

//	public Boolean isStartNow() {
//		return startNow;
//	}
//	
//	public Boolean getStartNow() {
//		return startNow;
//	}
//
//	public void setStartNow(Boolean startNow) {
//		this.startNow = startNow;
//	}

	public String getCronExpression() {
		return cronExpression;
	}

	public void setCronExpression(String cronExpression) {
		this.cronExpression = cronExpression;
	}

	public Date getTriggerEndTime() {
		return triggerEndTime;
	}

	public void setTriggerEndTime(Date triggerEndTime) {
		this.triggerEndTime = triggerEndTime;
	}

	public JobKey getKeyOfJobToFire() {
		return keyOfJobToFire;
	}

	public void setKeyOfJobToFire(JobKey keyOfJobToFire) {
		this.keyOfJobToFire = keyOfJobToFire;
	}

	public String getCalName() {
		return calName;
	}

	public void setCalName(String calName) {
		this.calName = calName;
	}

	public Date getTriggerStartTime() {
		return triggerStartTime;
	}

	public void setTriggerStartTime(Date triggerStartTime) {
		this.triggerStartTime = triggerStartTime;
	}

	public JobDataMap getNewJobDataMap() {
		return newJobDataMap;
	}

	public void setNewJobDataMap(JobDataMap newJobDataMap) {
		this.newJobDataMap = newJobDataMap;
	}

	public String getTriggerDescription() {
		return triggerDescription;
	}

	public void setTriggerDescription(String triggerDescription) {
		this.triggerDescription = triggerDescription;
	}

	public TriggerKey getTriggerKey() {
		return triggerKey;
	}

	public void setTriggerKey(TriggerKey triggerKey) {
		this.triggerKey = triggerKey;
	}

	public Integer getTriggerPriority() {
		return triggerPriority;
	}

	public void setTriggerPriority(Integer triggerPriority) {
		this.triggerPriority = triggerPriority;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
	}

}
